<%--
  Created by IntelliJ IDEA.
  User: Nieyu
  Date: 2016/10/27
  Time: 18:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
    <title></title>
    <style>
        h2 {
            text-align: center;
            margin-bottom: 10px;
        }

        table {
            border-collapse: collapse;
            margin: 0 auto;
        }

        .courseTable {
            width: 830px;
        }

        th, td {
            width: 28px;
            font-family: "微软雅黑";
            font-size: 16px;
            vertical-align: top;
            text-align: center;
        }

        th {
            line-height: 25px;
        }

        tbody {
            width: 621px;
        }

        .expert {
            margin-top: 50px;
        }
    </style>
</head>
<body>
<input type="button" name="button1" id="button1" value="返回上一页" onclick="history.go(-1)">

<c:forEach var="student" items="${students.datas}" begin="0" end="0">
    <h2>四川旅游学院本科（${student.grade}级${student.major}专业）课程质量（学生）评价详情表</h2>
</c:forEach>
<table border="1" class="courseTable">

    <tr>
        <th>序号</th>
        <th>课程名称</th>
        <th>平均分</th>
        <th>应评人数</th>
        <th>实评人数</th>
        <th>参评率</th>
    </tr>
    <c:if test="${students.totalPage le 0 }">
        <tr>
            <td colspan="9">目前还没有用户数据</td>
        </tr>
    </c:if>
    <c:if test="${students.totalPage gt 0}">
        <c:forEach items="${students.datas}" var="student" varStatus="id">
            <tr>
                <td>${id.index+1}</td>
                <td>${student.course}</td>
                <td>${student.score}</td>
                <td>${student.totalNumber}</td>
                <td>${student.numbers}</td>
                <td><fmt:formatNumber type="number"
                                      value="${(student.numbers/student.totalNumber)*100}"
                                      pattern="0.00" maxFractionDigits="2"/>%</td>
            </tr>
        </c:forEach>
    </c:if>
    <tr>
        <td colspan="9">
            <jsp:include page="/jsp/pager.jsp">
                <jsp:param value="/course/studentInfo" name="url"/>
                <jsp:param value="${students.totalPage }" name="items"/>
                <jsp:param value="grade,department,major,course" name="params"/>
            </jsp:include>
        </td>
    </tr>
</table>
</body>
</html>
